package com.example.demo.service.impl;

import com.example.demo.mapper.StudentMapper;
import com.example.demo.pojo.Course;
import com.example.demo.pojo.Student;
import com.example.demo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public Student getStudentByUid(String uid) {
        return studentMapper.getStudentByUid(uid);
    }

    @Override
    public void updateInfo(Student student) {
        studentMapper.updateInfo(student);
    }

    @Override
    public List<Course> getAllCourse(int sno) {
        return studentMapper.getAllCourse(sno);
    }

    @Override
    public void insertStudent(Student student) {
        studentMapper.insertStudent(student);
    }

    @Override
    public void deleteUser(String uid) {
        studentMapper.deleteUser(uid);
    }
}
